
package javaapp4;
import java.util.Arrays;
import java.util.Random;
import java.util.ArrayList;
import java.util.Iterator;

public class JavaApp4 {

    public static void main(String[] args) {
        Random randomGenerator = new Random();
        String[] AryString = new String[5];
        int rows, columns, i ,j;
        rows = 5;
        columns = 6;
        int[][] AryDouble = new int[rows][columns];
        ArrayList listTest = new ArrayList();
        listTest.add("Fallen Angel");
        listTest.add("Corrupted God");
        listTest.add("mutated Titan");
        listTest.add(10);
        Iterator it = listTest.iterator();
        while(it.hasNext()){
            System.out.println(it.next());
        }
        
        //Print out the new list 
        System.out.println("Wole list " + listTest);
        
        
        for(i=0; i<rows; i++){
            for(j=0; j<columns; j++){
                AryDouble[i][j] = randomGenerator.nextInt(500);    
            }
        }
        
        for (i=0; i<rows; i++){
            for (j=0; j<columns; j++){
                System.out.print(AryDouble[i][j] + " ");
            }
            System.out.println("");
        }
        AryString[0] = "this";
        AryString[1] = "is";
        AryString[2] = "a";
        AryString[3] = "string";
        AryString[4] = "array";
        
        //Sort the array in alphabetic order 
        Arrays.sort(AryString);
        
        for (int a = 0; a<AryString.length; a++){
            System.out.println(AryString[a]);
        }
    System.exit(0);
    }
    
}
